#ifndef __CALIBIRATION_H__
#define __CALIBIRATION_H__

/* Private includes ----------------------------------------------------------*/
#include "foc.h"
#include "main.h"
/* Private define ------------------------------------------------------------*/
/* Private typedef -----------------------------------------------------------*/

typedef enum eCalibStep
{
  CS_NULL = 0,
  CS_ENCODER_START,
  CS_ENCODER_CW_LOOP,
  CS_ENCODER_CCW_LOOP,
  CS_ENCODER_DP,
  CS_ENCODER_SAVE_LUT,
  CS_ENCODER_END
} tCalibStep;

/* Private extern variables --------------------------------------------------*/
/* Private function declaration ----------------------------------------------*/
void Calibration_Loop(FOC *foc);
float Encoder_Comp(int16_t *offset_lut, uint16_t encoder_raw, uint16_t offset);
#endif
